<?php

namespace app\data\service;

use app\data\model\NotarizedMatters as NotarizedMattersModel;
use think\admin\Service;

/**
 * 公证处数据服务
 * Class GoodsService
 * @package app\data\service
 */
class NotarialOffice extends Service
{
    /**
     * 公证事项数据
     * @param int $id
     * @return boolean
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    public static function getNotarizedMatters($id)
    {
        $field = 'id,name,type,initial_amount,continued_amount';
        $append = ['type_text'];
        $where[] = ['notarial_office_id','=',$id];
        $where[] = ['deleted','=',0];
        return NotarizedMattersModel::field($field)->append($append)->where($where)->select()->toArray();
    }
}